home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-04 / msh20.zip / MSHFILES.ZIP / BERK.MSH < prev    next >
Text File  |  1992-03-29  |  4KB  |  108 lines

  1. |  file BERK.MSH
  2. |
  3. | Convenient definitions if you own the Berkeley utilities
  4. |
  5. |
  6. berk
  7. ( ("od -ch "current.name&(exec)with_nomagic)od! 
  8.   ("wc " selected_list&exec)wc!
  9. |
  10. |  show space used by current directory/ space left on drive
  11. |
  12.   ("ls -MU"(exec)with_nomagic)ls_MU!
  13. |
  14. |  show space selected files would take on drive of next panel
  15. |
  16.   ("ls -U"next_dir unit_and_name drop&" "&selected_list&execute)
  17.    selected_fit_other!
  18.   ("ls"execute hide_all)ls_hide!
  19.   ( ( "grep -it ""where do you want to go?"50 input dup dir_pat!& " "&
  20.       prog_dir"tree"makename &
  21.       " | tr -d \\r\\n > "&prog_dir"junk.dir"makename&execute 
  22.       prog_dir"junk.dir"makename read dup (cwd! refresh)
  23.       (true debug!drop "warning" "no directory containing the string \""dir_pat&"\" "& 
  24.        message)ifelse 
  25.     )
  26.     ( prog_dir cwd! 
  27.       "ls -M  ["fixed_drives&"]:\\\\ |awk '{print $1}'>tree"& exec refresh
  28.     )
  29.     "Are you 
  30.  %going somewhere%. . . ?
  31.  or refreshing the %tree%"
  32.     () 35 2 temp_bordered_menu
  33.   ) whereto!
  34.   ("grep -i " "what string?" 50 input quote & " " &
  35.     "where (type a pattern -- or just return for *.*)?"
  36.    50 input dup (drop "*.*")ifnot&exec)find_string!
  37.   ("ls ["fixed_drives&"]:\\\\" &"what file pattern (e.g. john.*) " 50
  38.     input &exec)whereis!
  39. )
  40. ( ("hex dump"" 'od' is one of The Berkeley Utilities
  41.   it will create a hex dump of any file "message OPEN )od! 
  42.   ("word count"" 'wc' is one of The Berkeley Utilities
  43.   it will do a word count of any files "message OPEN )wc! 
  44.   ("ls -MU"" 'ls' is one of The Berkeley Utilities
  45.    it lists the files on your computer;
  46.    with these options, it asks for a header only 
  47.    and how much space is left"message OPEN )ls_MU!
  48.   ("ls -Ud:"" 'ls' is one of The Berkeley Utilities
  49.    it lists the files on your computer.
  50.    With these options, it asks whether the selected
  51.    files would fit on the other directory"message OPEN )selected_fit_other!
  52.   ("ls_hide"" 'ls' is one of The Berkeley Utilities
  53.  it lists the files on your computer;
  54.  here we ask for a listing and hide msh
  55. "message OPEN )ls_hide!
  56.   ( (OPEN)(OPEN)
  57.     "Are you 
  58.  %going somewhere%. . . ?
  59.  or refreshing the %tree%
  60.  
  61.  This is a superset of Norton's
  62.  Change directory. However, you need 
  63.  The Berkeley Utilities in order 
  64.  to implement it.
  65.     () 35 2 temp_bordered_menu)whereto!
  66.   ("find_string"" This is only possible when you own 
  67.  The Berkeley Utilities' grep" message OPEN)find_string!
  68.   ("whereis"" This is only possible when you own 
  69.  The Berkeley Utilities' ls" message OPEN)whereis!
  70. )
  71. ifelse
  72. |
  73. berk_cpmvrm
  74. ( ("cp -i -- "selected_list&" "&next_dir&
  75.    (deselect (execute)with_nomagic reread_next)confirm)copyto!
  76.   ("rm -v -- "selected_list&dup ok(deselect (exec)with_nomagic)(drop)ifelse)
  77.     delete!
  78.   ("mv -i -- "selected_list&" "&next_dir&dup
  79.     ok(deselect (exec)with_nomagic reread_next)(drop)ifelse)moveto!
  80. )if
  81. |
  82. |  This one for Delta owners
  83. |
  84. delta
  85. ( ( "delta " panel.pattern dirpart current.name&" "& 
  86.     ((panel.pattern dirpart current.name&" "&)in_next_panel)
  87.     #& & (execute)with_magic
  88.   )delta!
  89. )
  90. ( (" DELTA "" DELTA is a comparison tool
  91.  for directories and ASCII files.
  92.  It is ideal for programmers."message OPEN 
  93.   ) delta!
  94. )
  95. ifelse
  96. |
  97. |
  98. (" OPENetwork "" You can order our software with a 
  99.  credit card and a simple phone call to (718) 398-3838
  100.  
  101.  Mi-Shell                    $49
  102.  The Berkeley Utilities      $200
  103.  DELTA                       $100
  104.  
  105. July 1991"message)OPEN!
  106. |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
  107.